<extend name="Layout/page_detail" />
<block name="content">
{:W('PageHeader/simple',array('name'=>'修改音视频设备:'.$folder_name,'search'=>'N'))}

    <form method='post' id="form_data" name="form_data" enctype="multipart/form-data"  class="well form-horizontal">
        <input type="hidden" id="id" name="id" value="{$vo.id}">
        <input type="hidden" id="ajax" name="ajax" value="0">
        <input type="hidden" id="opmode" name="opmode" value="edit">

		<div class="form-group  col-sm-6">
            <label class="col-sm-4 control-label" for="name">名称*：</label>
            <div class="col-sm-8">
                <input type="text" id="name" name="name" value="{$vo.name}"  class="form-control" check="require">
            </div>
        </div>
		<div class="form-group  col-sm-6">
            <label class="col-sm-4 control-label" for="edition">型号*：</label>
            <div class="col-sm-8">
                <input type="text" id="edition" name="edition" value="{$vo.edition}"  class="form-control" check="require">
            </div>
        </div>
		<div class="form-group  col-sm-6">
            <label class="col-sm-4 control-label" for="serial">编号*：</label>
            <div class="col-sm-8">
                <input type="text" id="serial" name="serial" value="{$vo.serial}"  class="form-control" check="require">
            </div>
        </div>
		<div class="form-group  col-sm-6">
            <label class="col-sm-4 control-label" for="device_type">类型*：</label>
            <div class="col-sm-8">
                <select name="device_type" id="device_type" class="form-control" msg="请选择" check="require">
                <option value="">请选择</option>
                
					<option value="0">音频设备</option>
					<option value="1">视频设备</option>
					<option value="2">计算机</option>
					<option value="3">辅助设备</option>                
				</select>
            </div>
        </div>
		<div class="form-group  col-sm-6">
            <label class="col-sm-4 control-label" for="number">数量*：</label>
            <div class="col-sm-8">
                <input type="text" id="number" name="number" value="{$vo.number}"  class="form-control" check="require">
            </div>
        </div>
		<div class="form-group  col-sm-6">
            <label class="col-sm-4 control-label" for="buy_type">购买方式*：</label>
            <div class="col-sm-8">
                <select name="buy_type" id="buy_type" class="form-control" msg="请选择" check="require">
                <option value="">请选择</option>
                
					<option value="0">配发</option>
					<option value="1">自购</option>                
				</select>
            </div>
        </div>
		<div class="form-group  col-sm-6">
            <label class="col-sm-4 control-label" for="startdate">启用时间*：</label>
            <div class="col-sm-8">
                <input type="text" id="startdate" name="startdate" value="{$vo.startdate|substr=0,10}"  class="form-control input-date" check="require">
            </div>
        </div>
		<div class="form-group  col-sm-6">
            <label class="col-sm-4 control-label" for="status">状况*：</label>
            <div class="col-sm-8">
                <select name="status" id="status" class="form-control" msg="请选择" check="require">
                <option value="">请选择</option>
                
					<option value="0">堪用</option>
					<option value="1">损坏</option>                
				</select>
            </div>
        </div>
		<div class="form-group  col-sm-6">
            <label class="col-sm-4 control-label" for="storeman">保管员*：</label>
            <div class="col-sm-8">
                <input type="text" id="storeman" name="storeman" value="{$vo.storeman}"  class="form-control" check="require">
            </div>
        </div>        <div class="form-group">

        </div>
        <div class="form-actions">
            <input class="btn btn-sm btn-primary" type="button" value="保存" onclick="save();">
            <input  class="btn btn-sm btn-default" type="button" value="取消" onclick="go_return_url();">
        </div>
    </form>
</block>
<block name="js">
<script type="text/javascript">
    function save() {
        window.onbeforeunload = null;
        if (check_form("form_data")) {
        sendForm("form_data", "{:U('save')}");
        }
    }

    $(document).ready(function() {

		set_val('device_type',"{$vo.device_type}");
		set_val('buy_type',"{$vo.buy_type}");
		fill_time("startdate");
		set_val('status',"{$vo.status}");
    });
</script>
</block>